package com.whfc.ms.api.energy.service.impl;

import com.whfc.common.exception.BizException;
import com.whfc.common.result.PageData;
import com.whfc.env.entity.EnergyDevice;
import com.whfc.env.service.EnergyDeviceService;
import com.whfc.ms.api.energy.service.MsEnergyDeviceService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MsEnergyDeviceServiceImpl implements MsEnergyDeviceService {

    @DubboReference(interfaceClass = EnergyDeviceService.class, version = "1.0.0")
    private EnergyDeviceService energyDeviceService;


    @Override
    public PageData<EnergyDevice> listPage(Integer deptId, Integer pageNum, Integer pageSize, String name, Integer type) throws BizException {
        return energyDeviceService.listPage(deptId,pageNum,pageSize,name,type);
    }

    @Override
    public List<EnergyDevice> list(Integer deptId,String name,Integer type) throws BizException {
        return energyDeviceService.list(deptId,name,type);
    }

    @Override
    public void add(EnergyDevice param) throws BizException {
        energyDeviceService.add(param);
    }

    @Override
    public void edit(EnergyDevice param) throws BizException {
        energyDeviceService.edit(param);
    }

    @Override
    public void del(Integer id) throws BizException {
        energyDeviceService.del(id);
    }

}
